<template>
	<div>
		{{ num }}
		<br />
		{{ test }}
	</div>
</template>

<script setup lang="ts">
import { watch } from 'vue'
const { num, test = '123' } = defineProps(['num', 'test'])

watch(
	() => num,
	(newVal) => {
		console.log('num changed:', newVal)
	}
)

// const props = defineProps(['num', 'test']);

// watch(
// 	() => props.num,
// 	newVal => {
// 		console.log('num changed:', newVal);
// 	}
// );
</script>
